import {
  Button,
  Input,
  View,
  Text,
  Image,
  Chart,
  Scroller,
  List,
  WebView,
} from '@king-fisher/vue-components';
export default Vue => {
  Vue.use(window.feeHelper);
  Vue.component('k-button', Button);
  Vue.component('k-view', View);
  Vue.component('k-input', Input);
  Vue.component('k-text', Text);
  Vue.component('k-image', Image);
  Vue.component('k-scroller', Scroller);
  Vue.component('k-list', List);
  Vue.component('k-chart', Chart);
  Vue.component('k-web-view', WebView);
  Vue.component(
    'DistributionHistogram',
    window['iwencai/distribution-histogram@0.0.11index'].default
  );
  Vue.component('LinkageHistogram', window['iwencai/linkage-histogram@0.0.12index'].default);
  Vue.component('bar', window['iwencai/bar@1.0.7index'].default);
  Vue.component('baseLine', window['iwencai/line@1.0.9index'].default);
  Vue.component('RankTable', window['iwencai/rank-table@0.0.4index'].default);
  Vue.component('radar', window['iwencai/radar@1.0.4index'].default);
  // skywalking上报
  Vue.config.errorHandler = error => {
    console.log(error);
    window.ClientMonitor.reportFrameErrors(
      {
        category: 'js', // 类型
        grade: 'Warning', // 级别
      },
      error
    );
  };
};
